package com.example.picturetest;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private Button btn_activity;
    private Button btn2_activity;
    private Button btn3_activity;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
//        BGAQRCodeUtil.setDebug(true);
//        Toolbar toolbar = findViewById(R.id.toolbar);
//        setSupportActionBar(toolbar);

        btn_activity = findViewById(R.id.btn_activity);
        btn_activity.setOnClickListener(this);

        btn2_activity = findViewById(R.id.btn2_activity);
        btn2_activity.setOnClickListener(this);

        btn3_activity = findViewById(R.id.btn3_activity);
        btn3_activity.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_activity:
                intent = new Intent(MainActivity.this, PictureActivity.class);
                startActivity(intent);
                break;
            case R.id.btn2_activity:
                intent = new Intent(MainActivity.this, CodeActivity.class);
                startActivity(intent);
                break;
            case R.id.btn3_activity:
                intent = new Intent(MainActivity.this, ScanActivity.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
